import random

from app1.models import Book


names = [
    'CRACKING CODES WITH PYTHON',
    'PRACTICAL MACHINE LEARNING WITH PYTHON',
    'MODERN JAVA RECIPES',
    'LEARNING TENSORFLOW',
    'PRO C# 7',
    'A COMMON-SENSE GUIDE TO DATA STRUCTURES AND ALGORITHMS',
    'XML AND JSON RECIPES FOR SQL SERVER',
    'MOBILE GAME DEVELOPMENT WITH UNITY',
    'MASTERING MODULAR JAVASCRIPT',
    'JAVA QUICK SYNTAX REFERENCE, 2ND EDITION',
    'GRAY HAT HACKING, 5TH EDITION',
    'MICROSOFT SQL SERVER 2017 ON LINUX',
    'PRINCIPLES OF COMPUTER SECURITY, 5TH EDITION',
    'COMPTIA LINUX+/LPIC-1 CERTIFICATION ALL-IN-ONE EXAM GUIDE, PREMIUM 2ND EDITION',
    'COMMUNICATIONS RECEIVERS, 4TH EDITION',
    'HEALTHCARE INFORMATION TECHNOLOGY EXAM GUIDE, 2ND EDITION',
    'CORELDRAW X8, 12TH EDITION',
    'ANNUAL EDITIONS, 22ND EDITION',
    'HACKING EXPOSED MALWARE & ROOTKITS, 2ND EDITION',
    'HACKING EXPOSED INDUSTRIAL CONTROL SYSTEMS',
    'REACTIVE APPLICATION DEVELOPMENT',
    'REACTIVE DESIGN PATTERNS',
    'CROSS-PLATFORM DESKTOP APPLICATIONS',
    'STREAMING DATA',
    'REDUX IN ACTION',
    'COREOS IN ACTION',
    'RX.NET IN ACTION',
    'NIM IN ACTION',
    'KOTLIN IN ACTION',
    'RXJS IN ACTION',
    'GRAY HAT HACKING, 5TH EDITION',
    'MICROSOFT SQL SERVER 2017 ON LINUX',
    'PRINCIPLES OF COMPUTER SECURITY, 5TH EDITION',
    'REACTIVE APPLICATION DEVELOPMENT',
    'REDUX IN ACTION',
    'TENSORFLOW FOR DUMMIES',
    'NETWORKING ALL-IN-ONE FOR DUMMIES, 7TH EDITION',
    'WEB CODING & DEVELOPMENT ALL-IN-ONE FOR DUMMIES',
    'HELPING KIDS WITH CODING FOR DUMMIES',
    'PHP, MYSQL & JAVASCRIPT ALL-IN-ONE FOR DUMMIES',
]

authors = ['AARON', 'ABBAS', 'ABRAHAM', 'AFONSO', 'ALBERTUS', 'ALEXANDER', 'ALFONSO', 'ALFRED', 'ANTHONY', 'ANTIOCHUS', 'ARSENIUS', 'ASHOT', 'ASKIA', 'BABAI', 'BASIL', 'BERTIN', 'BHUMIBOL', 'BOLESŁAW', 'BRUNO', 'CASIMIR', 'CATHERINE', 'CHARLEMAGNE', 'CHLOTHAR', 'CHULALONGKORN', 'CNUT', 'CONSTANTINE', 'CYRUS', 'DARIUS', 'ELIEZER', 'EMPEROR', 'EUCRATIDES', 'EUTHYMIUS', 'FARRUKHAN', 'FERDINAND', 'FREDERICK', 'GENGHIS', 'GERHARD', 'GERO', 'GERTRUDE', 'GUSTAVUS', 'GWANGGAETO', 'HANNO', 'HENRY', 'HEROD', 'HIYYA', 'HUGH', 'HUMPHREY', 'IVAN', 'JOANNICIUS', 'JOHN', 'JUSTINIAN', 'KAMEHAMEHA', 'KANGXI', 'KANISHKA', 'KUBLAI', 'KVIRIKE', 'LLYWELYN', 'LOUIS', 'MACARIUS', 'MANGRAI', 'MANUEL', 'MIRCEA', 'MITHRIDATES', 'MSTISLAV', 'MUBARAK', 'NARAI', 'NARESUAN', 'ODO', 'OTTO', 'PARAKRAMABAHU', 'PETER', 'PHOTIUS', 'PHUTTHAYOTFA', 'POMPEY', 'POPE', 'QIN', 'RADAMA', 'RAJA', 'RAM', 'RAMESSES', 'RAMON', 'REZA', 'RHODRI', 'ROBERT', 'ROMAN', 'SANCHO', 'SARGON', 'SEJONG', 'SHAPUR', 'SIMEON', 'STEFAN', 'STEPHEN', 'TAMAR', 'THEODERIC', 'THEODOSIUS', 'TIGRANES', 'TIMUR', 'TIRIDATES', 'VALDEMAR', 'VALENTINIAN', 'VLADIMIR', 'WILLIAM', 'XERXES', 'YUKNOOM']


if __name__ == '__main__':
    for name in names:
        price = random.randint(20,100)
        year = random.randint(2000, 2018)
        author = random.choice(authors)
        Book.objects.create(name=name, price=price, year=year, author=author)
        print('added book %s' % name)
